#ifndef BITSTREAM_H_
#define BITSTREAM_H_

#include <cassert>
#include <cstdlib>
#include <iostream>

using namespace std;

#include "../exception/BadArgumentException.h"

using namespace ::miniprojeto::excpetion;

#include "Bits32Sequence.h"

namespace miniprojeto {
namespace util {

class BitStream
{
private:
	unsigned char* byteArray;
	int byteArrayLen;
	int byteIndice;
	int bitIndice;
	
public:
	BitStream();
	BitStream(unsigned char byteArray[], int byteArrayLen);
	virtual ~BitStream();
	
	int getBit(Bits32Sequence* seq);
	int getNbits(Bits32Sequence* seq, int n);
	
	int getByteArrayLen();
	int getByteIndice();
	int getBitIndice();
	void setByteArray(unsigned char byteArray[], int byteArrayLen);
	void setByteIndice(int byteIndice);
	void setBitIndice(int bitIndice);

};

}
}

#endif /*BITSTREAM_H_*/
